<template>
  <div class="app-container">
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="我的待办" name="myWork">
        <my-todo :activeName='activeName' v-if="activeName == 'myWork'"></my-todo>
        </el-tab-pane>
      <el-tab-pane  v-if="checkPermi(['workflow:process:finishedTab'])" label="部门未办" name="deptWork">
        <department-todo :activeName='activeName' v-if="activeName == 'deptWork'"></department-todo>
      </el-tab-pane>
      <el-tab-pane v-if="checkPermi(['workflow:process:detailTab'])" label="全部未办" name="allWork">
        <all-todo :activeName='activeName' v-if="activeName == 'allWork'"></all-todo>
      </el-tab-pane>
  </el-tabs>
  </div>
</template>

<script>
 import myTodo from '@/views/homeComponents/myTodo'
 import departmentTodo from '@/views/homeComponents/departmentTodo.vue'
 import allTodo from '@/views/homeComponents/allTodo.vue'


export default {
  components: {
    myTodo,
    departmentTodo,
    allTodo

  },
  data() {
    return {
      activeName:'myWork'
    }

  },
  methods: {

    handleClick(tab, event) {
      this.activeName = tab.name
        // console.log(tab, event);
      }
  }
}
</script>

<style scoped lang="scss">
.app-container{
  background: #f6f5f5;
}
</style>
